// Post Formatting in WP
.post-formatting {
	@img-horizontal-margin: 15px;
	@img-vertical-margin: 15px;

	@caption-bg: #EEE;
	@blockquote-text-color: #888;

	@font-weight: 500;
	@link-weight: 500;

	@dd-margin-bottom: 15px;

	@list-left-padding: 20px;

	@code-bg: #eee;
	@code-color: #333;

	@radius-base: 1px;


	.clearfix();


	// Links
	a {
		font-weight: @link-weight;
	}


	// Code
	code {
		background-color: @code-bg;
		color: @code-color;
		font-size: @font-size-small - 1;
		.border-radius(@radius-base);
	}


	// Keyboard
	kbd {
		.border-radius(@radius-base);
	}


	// Maximum Image Size
	img {
		max-width: 100%;
		height: auto !important;

		// Alignment
		&.alignleft,
		&.alignright {
			position: relative;
			vertical-align: text-top;
			margin-right: @img-horizontal-margin;
			margin-bottom: @img-vertical-margin;
			line-height: 1;
			top: 5px;
			float: left;
		}

		&.alignright {
			float: right;
			margin-right: 0;
			margin-left: @img-horizontal-margin;
		}
	}

	// WP Captions
	.wp-caption {
		max-width: 100%;
		margin-bottom: @img-vertical-margin;

		&.aligncenter {
			text-align: center;
			margin: 0 auto;
			margin-bottom: @img-vertical-margin;

			.wp-caption-text {
				margin: 0 @base-padding/2;
			}
		}

		&.alignleft {
			float: left;
			margin-right: @img-horizontal-margin;

			.wp-caption-text {
				margin-right: @base-padding;
			}
		}

		&.alignright {
			float: right;
			margin-left: @img-horizontal-margin;

			.wp-caption-text {
				margin-right: @base-padding;
			}
		}

		&.alignleft,
		&.alignright {
			position: relative;
			top: 5px;
		}

		.wp-caption-text {
			background: @caption-bg;
			padding: @base-padding/2 @base-padding;
			font-size: 12px !important;
		}
	}

	// Blockquote & Cite
	blockquote {

		p {
			color: @blockquote-text-color;
		}

		p:last-child {
			margin-bottom: 0 !important;
		}
	}

	cite {
		font-weight: @font-weight;
	}


	// Definition Lists
	dl {

		dd {
			margin-bottom: @dd-margin-bottom;
		}
	}


	// Lists
	ul, ol {
		padding-left: @list-left-padding;

		li {
			padding: 2px 0;
		}
	}


	// Address
	address {
		border-left: 3px solid @border-color;
		padding-left: @base-margin;
	}


	// Iframes
	iframe {
		max-width: 100%;
	}
}